let $axios = require('axios')
$axios.defaults.baseURL = 'http://localhost:8090/api'

export function accountSignIn(info){
  return new Promise((resolve, reject) => {
    $axios.post('/login',info).then(
      resp=>{
        if(resp&&resp.status==200){
          let res=resp.data;
          console.log(JSON.stringify(res))
          //console.log(res.data.code==200)
          //data.code
          res.code==200 ? resolve(res.data):reject(res);
        }
      }
    )
  })
}
